import React, { Component } from "react";
import { Text, View } from "react-native";
import Toast from "react-native-root-toast";

const FN = () => {};

export default ({
  msg = 'this is a message',
  duration = Toast.durations.LONG,
  position = Toast.positions.CENTER,
  hideOnPress = false,
  shadow = false,
  animation = true,
  delay = 0,
  onShow = FN,
  onHide = FN,
  onShown = FN,
  onHidden = FN,
}) => {

  Toast.show(msg, {
    duration,
    position,
    shadow,
    animation,
    hideOnPress,
    delay,
    onShow,
    onShown,
    onHide,
    onHidden
  });
}